package org.example.MedicalCrowdsourcing.model.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Future;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 创建项目的数据传输对象
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ProjectCreateDTO {
    @NotBlank(message = "项目标题不能为空")
    private String title;
    
    @NotBlank(message = "项目描述不能为空")
    private String description;
    
    @NotNull(message = "开始日期不能为空")
    @Future(message = "开始日期必须是将来的日期")
    private LocalDateTime startDate;
    
    @NotNull(message = "结束日期不能为空")
    @Future(message = "结束日期必须是将来的日期")
    private LocalDateTime endDate;
    
    @NotNull(message = "所需参与者数量不能为空")
    @Min(value = 1, message = "所需参与者数量必须大于0")
    private Integer requiredParticipants;
    
    @NotBlank(message = "所需数据类型不能为空")
    private String requiredDataTypes;
    
    private String participantCriteria;
    
    @NotNull(message = "补偿金额不能为空")
    @Min(value = 0, message = "补偿金额不能为负数")
    private BigDecimal compensationAmount;
} 